package com.qiwenshare.file.exception;

import com.qiwenshare.common.exception.QiwenException;
import com.qiwenshare.file.constant.QiwenFileErrorEnum;

public class QiwenFileException extends QiwenException {
    public QiwenFileException(Integer code, String message) {
        super(message);
        setCode(code);
    }


    public static QiwenFileException build(QiwenFileErrorEnum errorEnum) {
        return new QiwenFileException(errorEnum.getCode(),errorEnum.getMessage());
    }
}
